package cyou.breathe.blog.web.config;

import cyou.breathe.blog.web.handler.GlobalWebExceptionHandler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author: breathe
 * @createTime: 2025-08-26
 */
@AutoConfiguration
@ConditionalOnWebApplication
public class WebConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public GlobalWebExceptionHandler globalWebExceptionHandler() {
        return new GlobalWebExceptionHandler();
    }
}
